package com.qf.fmall.entity;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.persistence.*;

@Data
@AllArgsConstructor
@NoArgsConstructor
@ApiModel("商品分类的实体类")
public class Category {
    /**
     * 主键 分类id主键
     */
    @Id
    @Column(name = "category_id")
    @ApiModelProperty(value = "分类id主键", dataType = "int", example = "1")
    private Integer categoryId;

    /**
     * 分类名称 分类名称
     */
    @Column(name = "category_name")
    @ApiModelProperty(value = "分类名称", dataType = "String", example = "水果")
    private String categoryName;

    /**
     * 分类层级 分类得类型，
     * 1:一级大分类
     * 2:二级分类
     * 3:三级小分类
     */
    @Column(name = "category_level")
    @ApiModelProperty(value = "分类层级 分类得类型", dataType = "String", example = "1:一级大分类 2:二级分类 3:三级小分类")
    private Integer categoryLevel;

    /**
     * 父层级id 父id 上一级依赖的id，1级分类则为0，二级三级分别依赖上一级
     */
    @Column(name = "parent_id")
    @ApiModelProperty(value = "父层级id 上一级依赖的id", dataType = "String", example = "1级分类则为0，二级三级分别依赖上一级")
    private Integer parentId;

    /**
     * 图标 logo
     */
    @Column(name = "category_icon")
    @ApiModelProperty(value = "图标 logo", dataType = "String", example = "img")
    private String categoryIcon;

    /**
     * 口号
     */
    @Column(name = "category_slogan")
    @ApiModelProperty(value = "口号", dataType = "String", example = "口号")
    private String categorySlogan;

    /**
     * 分类图
     */
    @ApiModelProperty(value = "分类图", dataType = "String", example = "分类图")
    @Column(name = "category_pic")
    private String categoryPic;

    /**
     * 背景颜色
     */
    @ApiModelProperty(value = "背景颜色", dataType = "String", example = "背景颜色")
    @Column(name = "category_bg_color")
    private String categoryBgColor;

}